        {{ HTML::script('js/jquery.nanoscroller.min.js'); }}
        {{ HTML::script('js/jqwidgets/jqxcore.js'); }}
        {{ HTML::script('js/jqwidgets/jqxinput.js'); }}
        {{ HTML::style('js/jqwidgets/styles/jqx.base.css'); }}
        
        {{ HTML::script('js/jqwidgets/jqxbuttons.js'); }}
        {{ HTML::script('js/jqwidgets/jqxscrollbar.js') }}
        {{ HTML::script('js/jqwidgets/jqxdata.js'); }}
        {{ HTML::script('js/jqwidgets/jqxlistbox.js') }}
        {{ HTML::script('js/jqwidgets/jqxcombobox.js') }}
        
        
        <script type="text/javascript">
            $(document).ready(function () {
                // prepare the data
                var source =
                {
                    datatype: "json",
                    datafields: [
                        { name: 'ID' },
                        { name: 'MST' }
                    ],
                    url: 'ql=list_cstt'
                };
                var dataAdapter = new $.jqx.dataAdapter(source);
                $("#doantt").jqxComboBox(
                {
                    source: dataAdapter,
                    theme: 'classic',
                    width: 476,
                    height: 27,
                    selectedIndex: 0,
                    displayMember: 'MA_DOAN',
                    valueMember: 'ID'
                });
                $("#ntt").jqxComboBox(
                {
                    source: dataAdapter,
                    theme: 'classic',
                    width: 200,
                    height: 27,
                    selectedIndex: 0,
                    displayMember: 'NAM',
                    valueMember: 'ID'
                });
                $("#cstt").jqxComboBox(
                {
                    source: dataAdapter,
                    theme: 'classic',
                    width: 476,
                    height: 27,
                    selectedIndex: 0,
                    displayMember: 'MST',
                    valueMember: 'ID'
                });
            });
        </script>
        
{{ Form::open(array('url'=>'save=tienhanhtt','method'=>'post','class'=>'form-horizontal','id'=>'addform','role'=>'form')) }}
{{ Form::token()}}
<div class="panel panel-default">
    <div class="panel-heading">
        <h4 class="panel-title">
            <span class="glyphicon glyphicon-folder-close"></span>
            Thông Tin Tiến Hành Thanh Tra
        </h4>
    </div>
    <div class="panel-collapse collapse in">
        <table class="table" cellspacing="0" cellpadding="0" style="margin-bottom: 0px">
            <tr>
                <td>
                    <label for="idd" class="col-sm-3 control-label">Đoàn thanh tra:</label>
                    <div class="col-sm-8 control-label">
                        <div id='doantt'></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="cstt" class="col-sm-3 control-label">Cơ sở - Doanh nghiệp:</label>
                    <div class="col-sm-8 control-label">
                        <div id='cstt'></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="idnam" class="col-sm-3 control-label">Năm thanh tra:</label>
                    <div class="col-sm-2 control-label">
                        <div id='ntt'></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="ngaylbb" class="col-sm-5 control-label pull-left">Ngày lập biên bản:</label>
                    <div class="col-sm-3">
                        <input name="ngaylbb" type="date" class="form-control" required="" value="{{Input::old('ngaylbb')}}"/>
                    </div>
                    <label for="ngayktbb" class="col-sm-1 control-label"> Đến </label>
                    <div class="col-sm-3">
                        <input name="ngayktbb" type="date" class="form-control" required="" value="{{Input::old('ngayktbb')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="noidung_bb" class="col-sm-3 control-label">Nội dung kiểm tra:</label>
                    <div class="col-sm-8 control-label">
                        {{ Form::textarea('noidung_bb',Input::old('noidung_bb'),array('rows' => '3','placeholder' => 'Nhập nội dung kiểm tra','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="ldcl" class="col-sm-3 control-label">Lý do chênh lệch:</label>
                    <div class="col-sm-9">
                        {{ Form::text('ldcl',Input::old('ldcl'),array('placeholder' => 'Nhập lý do chênh lệch','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ththnv" class="col-sm-3 control-label">Tình hình thực hiện nghĩa vụ:</label>
                    <div class="col-sm-9">
                        {{ Form::text('ththnv',Input::old('ththnv'),array('placeholder' => 'Nhập tình hình thực hiện nghĩa vụ','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="kqkt" class="col-sm-3 control-label">Kết quả kiểm tra:</label>
                    <div class="col-sm-9">
                        {{ Form::text('kqkt',Input::old('kqkt'),array('placeholder' => 'Nhập kết quả kiểm tra','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="hvvp" class="col-sm-3 control-label">Hành vi vi phạm:</label>
                    <div class="col-sm-9">
                        {{ Form::text('hvvp',Input::old('hvvp'),array('placeholder' => 'Nhập hành vi vi phạm','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="yc" class="col-sm-3 control-label">Yêu cầu:</label>
                    <div class="col-sm-9">
                        {{ Form::text('yc',Input::old('yc'),array('placeholder' => 'Nhập yêu cầu','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="kn" class="col-sm-3 control-label">Kiến nghị:</label>
                    <div class="col-sm-9">
                        {{ Form::text('kn',Input::old('kn'),array('placeholder' => 'Nhập kiến nghị','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="htxp" class="col-sm-3 control-label">Hình thức xữ phạt:</label>
                    <div class="col-sm-9">
                        {{ Form::text('htxp',Input::old('htxp'),array('placeholder' => 'Nhập hình thức xữ phạt','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="htkphq" class="col-sm-3 control-label">Hình thức khắc phục hậu quả:</label>
                    <div class="col-sm-9">
                        {{ Form::text('htkphq',Input::old('htkphq'),array('placeholder' => 'Nhập hình thức khắc phục hậu quả','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="giayntso" class="col-sm-3 control-label">Giấy nộp thuế số:</label>
                    <div class="col-sm-9">
                        {{ Form::text('giayntso',Input::old('giayntso'),array('placeholder' => 'Nhập số giấy nộp thuế','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="ngaygnt" class="col-sm-3 control-label">Thời gian giấy nộp thuế:</label>
                    <div class="col-sm-9">
                        <input name="ngaygnt" type="date" class="form-control" required="" value="{{Input::old('ngaygnt')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="gc" class="col-sm-3 control-label">Ghi chú:</label>
                    <div class="col-sm-9">
                        {{ Form::textarea('gc',Input::old('gc'),array('rows' => '3','placeholder' => 'Nhập ghi chú','class'=>'form-control','required'=>'','pattern'=>'.{3,200}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaybc" class="col-sm-5 control-label pull-left">Thời gian báo cáo:</label>
                    <div class="col-sm-3">
                        <input name="ngaybc" type="date" class="form-control" required="" value="{{Input::old('ngaybc')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaylaptd" class="col-sm-5 control-label pull-left">Thời gian lập phiếu thẩm định:</label>
                    <div class="col-sm-3">
                        <input name="ngaylaptd" type="date" class="form-control" required="" value="{{Input::old('ngaylaptd')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="sott" class="col-sm-3 control-label">Số thông tư:</label>
                    <div class="col-sm-9">
                        {{ Form::text('sott',Input::old('sott'),array('placeholder' => 'Nhập số thông tư','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="soqd" class="col-sm-3 control-label">Số quyết định:</label>
                    <div class="col-sm-9">
                        {{ Form::text('soqd',Input::old('soqd'),array('placeholder' => 'Nhập số  quyết định','class'=>'form-control','required'=>'','pattern'=>'.{3,500}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaybh" class="col-sm-5 control-label pull-left">Ngày ban hành:</label>
                    <div class="col-sm-3">
                        <input name="ngaybh" type="date" class="form-control" required="" value="{{Input::old('ngaybh')}}"/>
                    </div>
                </td>
            </tr>  
            <tr>
                <td>
                    <label for="nbh" class="col-sm-3 control-label">Người ban hành:</label>
                    <div class="col-sm-9">
                        {{ Form::text('nbh',Input::old('nbh'),array('placeholder' => 'Nhập người ban hành','class'=>'form-control','required'=>'','pattern'=>'.{1,100}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="sokl" class="col-sm-3 control-label">Số kết luận:</label>
                    <div class="col-sm-9">
                        {{ Form::text('sokl',Input::old('sokl'),array('placeholder' => 'Nhập số kết luận','class'=>'form-control','required'=>'','pattern'=>'.{3,500}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaykl" class="col-sm-5 control-label pull-left">Thời gian kết luận:</label>
                    <div class="col-sm-3">
                        <input name="ngaykl" type="date" class="form-control" required="" value="{{Input::old('ngaykl')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="nk" class="col-sm-3 control-label">Người ký:</label>
                    <div class="col-sm-9">
                        {{ Form::text('nk',Input::old('nk'),array('placeholder' => 'Nhập người ký','class'=>'form-control','required'=>'','pattern'=>'.{3,500}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr>
            <tr>                      
                <td>
                    <div class="col-sm-offset-4 col-sm-8">
                        <a class="btn btn-default" id="refeshbtn" title="Hủy bỏ thao tác" type="resset"><span class="glyphicon glyphicon-refresh">&nbsp;</span>Hủy bỏ</a>&nbsp;&nbsp;
                         <button class="btn btn-success" id='submitbtn' title="Tạo lập hồ sơ">Tạo lập hồ sơ&nbsp;<span class="glyphicon glyphicon-step-forward"></span></button>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>
<script type="text/javascript">
     $('#submitbtn').click(function(){
        $("#pluslWin").modal('show');
    });</script>

<!-- pluslWin -->
<div class="modal fade" id="pluslWin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <label for="content">Chọn mẫu hồ sơ để tạo lập</label>
                <textarea id="content" name="content" class="form-control" rows="4"></textarea>
                <div></div>
                <label for="mark">Điểm</label>
                <input id="mark" name="mark" class="form-control" />
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary pull-left" id="detailBtn"><span class="glyphicon glyphicon-list-alt"></span> Chi tiết mẫu</button>
                <button type="button" class="btn btn-primary" id="plusBtn"><span class="glyphicon glyphicon-plus-sign"></span> Xuất mẫu</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Thoát</button>
            </div>
        </div>
    </div>
</div>

{{Form::close()}}    

@if(Session::has('success')) 
<script type="text/javascript">
    toastr.success("{{Session::get('success')}}");
</script>
@endif
@if(Session::has('error')) 
<script type="text/javascript">
    toastr.error("{{Session::get('error')}}");
</script>
@endif